package Entity;

import java.io.Serializable;

/** this class Create new Instance of message*/
public class Message implements Serializable {
	
	private static final long serialVersionUID = 42L;
	
	/**attributes for message*/
	private String msg;
	private Object obj;
	private boolean status;
	private String statusMsg;
	
	/**default constructor*/
	public Message()
	{
		this.setMsg(null);
		this.setObj(null);
		this.setStatus(false);
		this.setStatusMsg(null);
	}
	
	/**Full constructor with all attributes*/
	public Message(Object o,String msg)
	{
		this.setMsg(msg);
		this.setObj(o);
		this.setStatus(false);
		this.setStatusMsg(null);
		
	}
	
	/**constructor with only msg attribute */
	public Message(String msg)
	{
		this.setMsg(msg);
	}

	/**Function which checks the status  */
	public boolean isStatus() 
	{
		return status;
	}
	
	/**get functions*/
	public String getMsg() 
	{
		return msg;
	}

	public Object getObj() 
	{
		return obj;
	}
	
	public String getStatusMsg() 
	{
		return statusMsg;
	}
	
	/**set functions*/
	public void setMsg(String msg) 
	{
		this.msg = msg;
	}

	public void setObj(Object obj) 
	{
		this.obj = obj;
	}

	public void setStatus(boolean status) 
	{
		this.status = status;
	}

	public void setStatusMsg(String statusMsg) 
	{
		this.statusMsg = statusMsg;
	}
		
}